Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


LinkUpdated

The LinkUpdated method should replace the content at each destination of a link with new content from an updated link object.

void LinkUpdated (in ODLink updatedLink,
                  in ODUpdateID change);
updatedLink
A reference to a link that has changed.
change
The update ID associated with the link; an identifier for a particular version of link-source data.
DISCUSSION
Each link object maintains a registry of dependent parts. If this part is registered as a dependent of the link source (by having called the link's RegisterDependent method), OpenDoc calls this method automatically when the link destination object changes.

Your part's LinkUpdated method should retrieve the data from the link and incorporate or embed that data into your part at the link's destination, thereby replacing any previous content of the link.

It is not always necessary to update link destinations immediately. For example, if the destination has scrolled offscreen but is registered as a dependent of the link, updating does not need to occur until the destination scrolls back into view. Your part editor can, if desired, perform link updating as a background task.

OVERRIDING
When you subclass ODPart, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrDoesNotLink
The specified link is not a link of this part.
SEE ALSO
The ODUpdateID type (page 917).
The ODLink::RegisterDependent method (page 355).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Creating a Link at the Destination" on page 380 in OpenDoc Programmer's Guide.
"Updating a Link at the Destination" on page 384 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help